USE [Invoice]

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Nhat Hoang
-- Create date: 30/03/2011
-- Description:	sp_HOADON_GetById
-- =============================================
CREATE PROCEDURE sp_HOADON_GetById
	@maHoaDon uniqueidentifier
AS
BEGIN
	SELECT [MaHoaDon]
		  ,[MaQuyenHoaDon]
		  ,[SoHoaDon]
		  ,[KyHieu]
		  ,[NgayTaoHoaDon]
		  ,[MaKhachHang]
		  ,[MaHinhThucThanhToan]
		  ,[MaLoaiTienTe]
		  ,[MaLoaiThue]
		  ,[TenMatHangBan]
		  ,[LyDoBanHang]
		  ,[SoPhieuThu]
		  ,[GiamGia]
		  ,[ChietKhau]
		  ,[TienHangTruocThue]
		  ,[TienThue]
		  ,[TienHangSauThue]
		  ,[TienBangChu]
		  ,[MaTinhTrangHoaDon]
		  ,[NguoiMua]
		  ,[NguoiBan]
		  ,[ThuTruongDonVi]
		  ,[NgayInHD]
		  ,[NguoiInHD]
		  ,[CreateBy]
		  ,[ModifiedBy]
		  ,[ModifiedOn]
	FROM [HOADON]
	WHERE [MaHoaDon] = @maHoaDon
END
GO
